﻿using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace BF3StatsNetApi.BLL
{
    public class Kit
    {
        public string name { get; set; }
        public string type { get; set; }
        public string img { get; set; }
        public string img_bk { get; set; }
        private List<Unlock> _unlocks;
        public object unlocks
        {
            get { return _unlocks; }
            set
            {
                _unlocks = new List<Unlock>();
                foreach (JToken nr in (JArray)value)
                {
                    Unlock _unlock = JsonConvert.DeserializeObject<Unlock>(nr.ToString());
                    _unlocks.Add(_unlock);
                }
            }
        }

        public long score { get; set; }
        public double time { get; set; }
        public double timer { get; set; }
        public double timeu { get; set; }
        public Star star { get; set; }

    }
}
